#ifndef SYSTEM_H
#define SYSTEM_H

#include <list>
#include <vector>

#include "Optimizer.h"
#include "../../DataStructure/LandMarkPLX.h"
// #include "initialization/Initialization.h"

namespace Estimator
{

class Frame;
class LandMarkPLX;
class Calibration;
class Optimizer;

class Managing
{
  public:
    Managing() = delete;
    Managing(Calibration* pcalibration): mpCalibration_(pcalibration){}

    virtual ~Managing() = default;

    void AddFrame( Frame* frame);

    void RemoveLandMarkWithSingleAnchor();

    void SetInitializationParameters();

    // using sorted array in order to access them quickly. Right now not sorted yet.
    std::vector<LandMarkPLX> mlLandMarkContainer_;

    // Frame Pointer's container..
    std::vector<Frame*> mvpFrameContainer_;

    Calibration* GetCalibration() const {return mpCalibration_;} 

    // void ReadGTParallax(std::map<size_t, std::array<double, 5 > >& maplandmark);
    void AddNoiseToRotations();

    // void WriteLandmarkParallax(const Optimizer& optimizer, std::string filename);
    // void WriteLandmarkParallax(const initialization& optimizer, std::string filename);
    void SimplyOutPutParallax(std::string filename);

    friend std::ostream& operator<<(std::ostream& os, const Managing& timer);
  private:
    Calibration* mpCalibration_ = nullptr;

};

}

#endif